import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'
// const Layout = () => import('@/layout')
import Layout from '@/layout'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    meta: { title: 'Login', icon: 'iconsi-glyph-database' },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/login/login.vue')
  },
  {
    path: '/main',
    name: 'Main',
    component: Layout,
    redirect: '/main/dashboard',
    meta: { title: 'Dashboard', icon: 'icongallery-view' },
    children: [
      {
        path: 'dashboard',
        name: 'Dashboard',
        component: () => import('@/views/dashboard/index'),
        meta: { title: '仪表盘', icon: 'iconshangchuan' }
      }
    ]
  },
  {
    path: '/table',
    name: 'Table',
    component: Layout,
    redirect: '/table/table',
    meta: { title: '表格', icon: 'iconadd-account' },
    children: [
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      }
    ]
  },
  {
    path: '/table',
    name: 'Table',
    component: Layout,
    redirect: '/table/table',
    meta: { title: '表格', icon: 'iconadd-account' },
    children: [
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      },
      {
        path: 'table',
        // name: 'Dashboard',
        component: () => import('@/views/table/table'),
        meta: { title: 'Table', icon: 'iconshare_fill' }
      }
    ]
  },
  {
    path: '/main1',
    name: 'Main1',
    meta: { title: 'Main1', icon: 'iconsi-glyph-database' },
    component: () => import(/* webpackChunkName: "about" */ '../views/Main.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
